<?php

/**
 * This is the model class for Login Form.
 * 
 * @author longuyvinh <longuyvinh.ny@gmail.com>
 * @version 1.0
 *
 */
class CheckoutOrderForm extends CFormModel {

    public $zingId;
    public $payment_method;
    public $payment_currency;
    public $billing_street;
    public $billing_city;
    public $billing_region;
    public $billing_zipcode;
    public $billing_country;
    public $delivery_name;
    public $delivery_company;
    public $delivery_phone;
    public $delivery_email;
    public $delivery_address;
    public $delivery_city;
    public $delivery_date;
    public $delivery_message;
    public $delivery_method;

    /**
     * Declares the validation rules.
     * The rules state that username and password are required,
     * and password needs to be authenticated.
     */
    public function rules() {
        return array(
            array('payment_method, payment_currency', 'required'),
        );
    }

    /**
     * Declares attribute labels.
     */
    public function attributeLabels() {
        return array(
            'zingId' => t('cms', 'Zing ID'),
            'payment_method' => t('cms', 'Payment Method'),
            'payment_currency' => t('cms', 'Currency'),
            'billing_street' => t('cms', 'Billing Street'),
            'billing_city' => t('cms', 'Billing City'),
            'billing_region' => t('cms', 'Billing Region'),
            'billing_zipcode' => t('cms', 'Billing Zipcode'),
            'billing_country' => t('cms', 'Billing Country'),
            'delivery_name' => t('cms', 'Họ & tên'),
            'delivery_company' => t('cms', 'Công ty'),
            'delivery_phone' => t('cms', 'Số điện thoại'),
            'delivery_email' => t('cms', 'Email'),
            'delivery_address' => t('cms', 'Địa chỉ'),
            'delivery_city' => t('cms', 'Tỉnh/Thành phố'),
            'delivery_date' => t('cms', 'Ngày giao hàng'),
            'delivery_message' => t('cms', 'Thông điệp'),
            'delivery_method' => t('cms', 'Delivery Method'),
        );
    }

    public function checkCountry($attribute, $params) {
        
    }

}
